﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace EMC.VISITOR.Core.SeedData
{
    public class SysPageOptionConfigColumnSeedData : ISqlSugarEntitySeedData<SysPageOptionConfigColumn>
    {
        /// <summary>
        /// 种子数据
        /// </summary>
        /// <returns></returns>
        public IEnumerable<SysPageOptionConfigColumn> HasData()
        {
            List<SysPageOptionConfigColumn> columns = new List<SysPageOptionConfigColumn>();
            string configPath = "/main/sysDataTransfer/index";
            var enums = EnumExtension.GetEnumByName("MyDbType").GetEnumDescDictionary();
            var enumSelectList = enums.Select(em => new ColumnProps
            {
                label = em.Value,
                value = em.Key
            }).ToList();


            columns.Add(new SysPageOptionConfigColumn {Id = 10000000000000,configPath=configPath,label = "需要排除的表",prop= "sourceExcludeTables",
                type="input",width =300,hide=false,display=true,showColumn=true,search=true,order=-6,overHidden=true,disabled=false ,fixed_=false,sortable=true,
                maxlength=4000,span=6,editDisplay=true,viewDisplay=true,addDisabled=false,editDisabled=false,addDisplay=true,showWordLimit=true,searchFilterable=true,labelWidth=120});

            columns.Add(new SysPageOptionConfigColumn {Id = 10000000000001,configPath=configPath,label = "源数据库配置编号",prop= "sourceConfigId",
                type="input",width =200,hide=false,display=true,showColumn=true,search=true,order=-1,overHidden=true,disabled=false ,fixed_=false,sortable=true,
                maxlength=255,span=8,editDisplay=true,viewDisplay=true,addDisabled=false,editDisabled=false,addDisplay=true,showWordLimit=true,searchFilterable=true,labelWidth=180});

            columns.Add(new SysPageOptionConfigColumn {Id = 10000000000002,configPath=configPath,label = "源数据库名称",prop= "sourceDbName",
                type="input",width =200,hide=false,display=true,showColumn=true,search=true,order=-2,overHidden=true,disabled=false ,fixed_=false,sortable=true,
                maxlength=255,span=8,editDisplay=true,viewDisplay=true,addDisabled=false,editDisabled=false,addDisplay=true,showWordLimit=true,searchFilterable=true,labelWidth=180});
           
            columns.Add(new SysPageOptionConfigColumn {Id = 10000000000003,configPath=configPath,label = "源数据库类型",prop= "sourceDbType",type= "select",
                width =200,hide=false,display=true,showColumn=true,search=true,order=-3,overHidden=true,disabled=false ,fixed_=false,sortable=true,filterable=true,virtualize=true,
                props =new ColumnPropMapperInfo { label="label",value="value"},dicData= enumSelectList,
                span=8,editDisplay=true,viewDisplay=true,addDisabled=false,editDisabled=false,addDisplay=true,showWordLimit=true,searchFilterable=true,labelWidth=180});
            
            
            columns.Add(new SysPageOptionConfigColumn {Id = 10000000000004,configPath=configPath,label = "源数据链接字符串",prop= "sourceConnectionString",
                type = "textarea", width = 300,hide =false,display=true,showColumn=true,search=true,order=-4,overHidden=true,disabled=false ,fixed_=false,sortable=true,
                maxlength=1000,span=24,editDisplay=true,viewDisplay=true,addDisabled=false,editDisabled=false,addDisplay=true,showWordLimit=true,searchFilterable=true,labelWidth=180});
           
           columns.Add(new SysPageOptionConfigColumn {Id = 10000000000005,configPath=configPath,label = "是否清空目标表",prop= "clearTargetTableFlag",
                type= "switch",width =120,hide=false,display=true,showColumn=true,search=true,order=-13,overHidden=true,disabled=false ,fixed_=false,sortable=true,
                span=8,editDisplay=true,viewDisplay=true,addDisabled=false,editDisabled=false,addDisplay=true,showWordLimit=true,searchFilterable=true,labelWidth=180});

           columns.Add(new SysPageOptionConfigColumn {Id = 10000000000006,configPath=configPath,label = "目标数据库配置编码",prop= "targetConfigId",
                type="input",width =200,hide=false,display=true,showColumn=true,search=true,order=-8,overHidden=true,disabled=false ,fixed_=false,sortable=true,
                maxlength=255,span=8,editDisplay=true,viewDisplay=true,addDisabled=false,editDisabled=false,addDisplay=true,showWordLimit=true,searchFilterable=true,labelWidth=180});
           
           columns.Add(new SysPageOptionConfigColumn {Id = 10000000000007,configPath=configPath,label = "目标数据库名称",prop= "targetDbName",
                type="input",width =200,hide=false,display=true,showColumn=true,search=true,order=-9,overHidden=true,disabled=false ,fixed_=false,sortable=true,
                maxlength=255,span=8,editDisplay=true,viewDisplay=true,addDisabled=false,editDisabled=false,addDisplay=true,showWordLimit=true,searchFilterable=true,labelWidth=180});
           
           columns.Add(new SysPageOptionConfigColumn {Id = 10000000000008,configPath=configPath,label = "目标数据库类型", prop= "targetDbType",type= "select",
                width =200,hide=false,display=true,showColumn=true,search=true,order=-10,overHidden=true,disabled=false ,fixed_=false,sortable=true,filterable=true,virtualize=true,
                props =new ColumnPropMapperInfo { label="label",value="value"},dicData= enumSelectList,
                span=8,editDisplay=true,viewDisplay=true,addDisabled=false,editDisabled=false,addDisplay=true,showWordLimit=true,searchFilterable=true,labelWidth=180});
            
           columns.Add(new SysPageOptionConfigColumn {Id = 10000000000009,configPath=configPath,label = "目标数据链接字符串",prop= "targetConnectionString",
                type= "textarea", width = 300, hide=false,display=true,showColumn=true,search=true,order=-11,overHidden=true,disabled=false ,fixed_=false,sortable=true,
                maxlength=1000,span=24,editDisplay=true,viewDisplay=true,addDisabled=false,editDisabled=false,addDisplay=true,showWordLimit=true,searchFilterable=true,labelWidth=180});
           
           columns.Add(new SysPageOptionConfigColumn {Id = 10000000000010,configPath=configPath,label = "Id",prop= "Id",
                type="input",width =100,hide=true,display=false,showColumn=false,search=false,order=-14,overHidden=true,disabled=false ,fixed_=false,sortable=true,
                maxlength=19,span=6,editDisplay=true,viewDisplay=true,addDisabled=false,editDisabled=false,addDisplay=true,showWordLimit=true,searchFilterable=true,labelWidth=80});
           
           columns.Add(new SysPageOptionConfigColumn {Id = 10000000000011,configPath=configPath,label = "更新时间",prop= "updateTime",type= "date",
               width =200,hide=true,display=false,showColumn=false,search=false,order=-15,overHidden=true,disabled=false ,fixed_=false,sortable=true,
                span=6,editDisplay=true,viewDisplay=true,addDisabled=false,editDisabled=false,addDisplay=true,showWordLimit=true,searchFilterable=true,labelWidth=80});
           
           columns.Add(new SysPageOptionConfigColumn {Id = 10000000000012,configPath=configPath,label = "需要迁移源表的特性",prop= "sourceTableAttribute",
                type="input",width =450,hide=false,display=true,showColumn=true,search=true,order=-5,overHidden=true,disabled=false ,fixed_=false,sortable=true,
                maxlength=4000,span=6,editDisplay=true,viewDisplay=true,addDisabled=false,editDisabled=false,addDisplay=true,showWordLimit=true,searchFilterable=true,labelWidth=180});
           
           columns.Add(new SysPageOptionConfigColumn {Id = 10000000000013,configPath=configPath,label = "只更新的表", prop= "sourceOnlyTransferTables",
                type="input",width =250,hide=false,display=true,showColumn=true,search=true,order=-7,overHidden=true,disabled=false ,fixed_=false,sortable=true,
                maxlength=4000,span=6,editDisplay=true,viewDisplay=true,addDisabled=false,editDisabled=false,addDisplay=true,showWordLimit=true,searchFilterable=true,labelWidth=100});
           
           columns.Add(new SysPageOptionConfigColumn {Id = 10000000000014,configPath=configPath,label = "迁移日志内容", prop= "description",
                type= "textarea",width =300,hide=false,display=true,showColumn=true,search=true,order=-13,overHidden=true,disabled=false ,fixed_=false,sortable=true,
                span=24,editDisplay=true,viewDisplay=true,addDisabled=false,editDisabled=false,addDisplay=true,showWordLimit=true,searchFilterable=true,labelWidth=100});
           
            return columns;
        }


    }
}